package $2024_3_18.Demo1;

public class Truck extends Car{
    String type;

    public Truck(String type) {
        this.type = type;
    }

    @Override
    public void drivingMethod(){
        System.out.println("卡车正在行驶");
        super.drivingMethod();
    }
    public void trumpet(){
        System.out.println(type + "按喇叭");
    }
}
